<template>
	<!--公司人才库-->
	<div id="infotanlenters">
		<cus-top></cus-top>
		<div class="wrap tanlenters">
			<div class="orther-title">
				人才库
			</div>
			<!--<el-breadcrumb separator-class="el-icon-arrow-right">
				<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
				<el-breadcrumb-item>人才招聘</el-breadcrumb-item>
			</el-breadcrumb>-->
			<el-table :data="tableData.filter(data => !search || data.rname.toLowerCase().includes(search.toLowerCase()))" style="width: 100%">
				<el-table-column type="selection" width="55">
				</el-table-column>
				<el-table-column label="姓名" prop="rname">
				</el-table-column>
				<el-table-column label="职位名称" prop="pname">
				</el-table-column>
				<el-table-column label="发布城市" prop="city">
				</el-table-column>
				<el-table-column label="年龄" prop="age">
				</el-table-column>
				<el-table-column label="工作年限" prop="year">
				</el-table-column>
				<el-table-column label="学历" prop="educ">
				</el-table-column>
				<el-table-column align="right" width="200">
					<template slot="header" slot-scope="scope">
						<el-input v-model="search" size="mini" placeholder="输入关键字搜索" />
					</template>
					<template slot-scope="scope">
						<el-button size="mini" type="success" @click="handleEdit(scope.$index, scope.row)">信息详情</el-button>
						<el-button size="mini" type="info" @click="handleDelete(scope.$index, scope.row)">简历下载</el-button>
					</template>
				</el-table-column>
			</el-table>
			<div class="orther-opt">
				<el-button type="primary" size="small">查看简历</el-button>
				<el-button type="primary" size="small">导出简历</el-button>
				<el-button type="primary" size="small">面试邀请</el-button>
				<el-button type="primary" size="small">其他</el-button>
			</div>
		</div>
	</div>
</template>

<script>
	import Top from './top'
	export default {
		components: {
			'CusTop': Top
		},
		data() {
			return {
				tableData: [{
					rname: '王小虎',
					pname: 'Web前端实习生',
					city: '成都',
					age: '22',
					year: '1年',
					educ: '本科'
				}, {
					rname: '张三',
					pname: 'Java开发实习生',
					city: '成都',
					age: '25',
					year: '2年',
					educ: '本科'
				}, {
					rname: '李四',
					pname: 'Java开发实习生',
					city: '成都',
					age: '26',
					year: '3年',
					educ: '本科'
				}, {
					rname: '王五',
					pname: 'Java开发实习生',
					city: '成都',
					age: '22',
					year: '1年',
					educ: '本科'
				}],
				search: ''
			}
		},
		methods: {
			handleEdit(index, row) {
				console.log(index, row);
			},
			handleDelete(index, row) {
				console.log(index, row);
			},
		}

	}
</script>
<style>
	.el-table td,
	.el-table th {
		text-align: center;
	}
</style>
<style scoped>
	#infotanlenters {
		background-color: #f1f1f1;
		height: 100%;
	}
	
	.tanlenters {
		margin-top: 30px;
	}
	.orther-opt{
		margin-top: 30px;
	}
	.orther-title{
		display: inline-block;
		margin-bottom: 10px;
		font-weight: bold;
		font-size: 18px;0
		background-color: #00CFFF;
		padding: 10px 20px;
		border-radius: 3px;
		color: #fff;
	}
</style>